package test;
//没有做完
public class Demo7 {
    public static void main(String[] args) {
        int[] arr = {11, 36, 27, 16, 45, 67, 68, 92};
        int index = 0;
        int max;
        boolean flag = true;
        for (int i = 0; i < arr.length; i++) {
            for (int j = i; j < arr.length - 1; j++) {
                if (arr[j] >arr[j + 1]) {
                    max=arr[j];
                    continue;
                }
                break;
            }

            for (int k = i; k < arr.length - 1 - i; k++) {
                if (arr[i] < arr[k + 1]) {
                    index = i;
                } else {
                    flag = false;
                }
            }

        }
        if (flag = true) {
            System.out.println("要找的数是" + arr[index ] + "在" + (index + 1) + "位");
        } else if (flag = false)
            System.out.println("数组中没有这样的数");
    }
}
